home *** CD-ROM | disk | FTP | other *** search
/ Micromanía: 150 Juegos 2010 / 150Juegos_16.iso / Shareware / Shape Smash / shape-smash.swf / scripts / Code / WINDOWS / _wd183.as < prev    next >
Encoding:
Text File  |  2010-05-14  |  6.0 KB  |  189 lines

  1. package Code.WINDOWS
  2. {
  3.    import Code.LIB._cg33;
  4.    import Code.LIB._ct751;
  5.    import Code.LIB._gt710;
  6.    import Code.LIB._my111;
  7.    import Code.LIB._vx23;
  8.    import Code.LIB._wy567;
  9.    import Code.OPTIONS.LEVELS;
  10.    import Code.OPTIONS._gs337;
  11.    import Code.WINDOWS.DIALOGS._jt456;
  12.    import Code._fi197;
  13.    import flash.events.Event;
  14.    import flash.events.MouseEvent;
  15.    
  16.    public class _wd183 extends _gt710
  17.    {
  18.       public static const stNormal:int = 0;
  19.       
  20.       public static const stEnterName:int = 1;
  21.       
  22.       private var iPlayers:Array;
  23.       
  24.       private var iLabel:_wy567;
  25.       
  26.       public var iEnterName:_jt456;
  27.       
  28.       public var iOk:_ct751;
  29.       
  30.       public var iCancel:_ct751;
  31.       
  32.       public var iDelete:_ct751;
  33.       
  34.       public var iNew:_ct751;
  35.       
  36.       private var iInd:int;
  37.       
  38.       public var iBLeft:_ct751;
  39.       
  40.       public var iBRight:_ct751;
  41.       
  42.       public function _wd183()
  43.       {
  44.          var _loc1_:String = null;
  45.          var _loc2_:Array = null;
  46.          _loc1_ = _gs337.iLanguage.strOk;
  47.          _loc2_ = [[_fi197._xy367,_gs337.iLanguage.strChangePlayer,_gs337.cGreen,50,_my111.SmallText,90,30,null,true],[_fi197._tr788,_gs337.iLanguage.strOk,_gs337.cGellGreen,170,50,28,_gs337.cWhite,35,300,"iOk",true],[_fi197._tr788,_gs337.iLanguage.strCancel,_gs337.cGellRed,170,50,28,_gs337.cWhite,300,300,"iCancel",true],[_fi197._ww533,_gs337.cGellAqua,500,170,false,0.7,20,110,null,true],[_fi197._tr788,_gs337.iLanguage.strNew,_gs337.cGellGreen,120,50,25,_gs337.cWhite,380,120,"iNew",true],[_fi197._tr788,_gs337.iLanguage.strDelete,_gs337.cGellRed,120,50,25,_gs337.cWhite,380,200,"iDelete",true],[_fi197._cf377,40,40,"<",_gs337.cOrange,40,50,210,"iBLeft",true],[_fi197._cf377,40,40,">",_gs337.cOrange,40,170,210,"iBRight",true]];
  48.          super(_loc2_);
  49.          this.iPlayers = _cg33._ts507;
  50.          _pp317();
  51.       }
  52.       
  53.       override public function _ba289(param1:MouseEvent) : void
  54.       {
  55.          if(this.iEnterName)
  56.          {
  57.             return;
  58.          }
  59.          if(param1.target == this.iNew._en365)
  60.          {
  61.             this.State = stEnterName;
  62.          }
  63.          if(param1.target == this.iBLeft._en365)
  64.          {
  65.             if(this.iInd == 0)
  66.             {
  67.                return;
  68.             }
  69.             --this.iInd;
  70.             this.Label = this.iPlayers[this.iInd];
  71.          }
  72.          if(param1.target == this.iBRight._en365)
  73.          {
  74.             if(this.iInd >= this.iPlayers.length - 1)
  75.             {
  76.                return;
  77.             }
  78.             ++this.iInd;
  79.             this.Label = this.iPlayers[this.iInd];
  80.          }
  81.          if(param1.target == this.iDelete._en365)
  82.          {
  83.             _cg33._og419(this.iPlayers[this.iInd][0]);
  84.             if(!_cg33._ss555)
  85.             {
  86.                this.State = stEnterName;
  87.                this.iLabel.Text = " ";
  88.                return;
  89.             }
  90.             this.Label = _cg33._ss555;
  91.             this.iInd = _cg33.iPlayerPos;
  92.          }
  93.          if(param1.target == this.iOk._en365)
  94.          {
  95.             _cg33._jl606(this.iPlayers[this.iInd][0]);
  96.             this.hide();
  97.          }
  98.          if(param1.target == this.iCancel._en365)
  99.          {
  100.             this.hide();
  101.          }
  102.       }
  103.       
  104.       public function _pp317() : void
  105.       {
  106.          this.iLabel = new _wy567(34,_gs337.cAquaLight,_my111.SmallText);
  107.          this.addChildAt(iLabel,6);
  108.          this.iLabel._vq458 = 40;
  109.          this.iLabel._vg471 = 120;
  110.          this.Label = _cg33._ss555;
  111.          this.iInd = _cg33.iPlayerPos;
  112.          this.State = stNormal;
  113.          this._xe768(50,0);
  114.       }
  115.       
  116.       private function set Label(param1:Array) : void
  117.       {
  118.          var _loc2_:* = null;
  119.          var _loc3_:String = null;
  120.          var _loc4_:String = null;
  121.          _loc2_ = new String();
  122.          if(_vx23._xp514)
  123.          {
  124.             _loc3_ = _gs337.iLanguage.strRoundzLevel + ": " + _gs337.iLanguage.strFinished;
  125.          }
  126.          else
  127.          {
  128.             _loc3_ = _gs337.iLanguage.strRoundzLevel + ": " + int(_cg33._ss555[1].prRoundzLevel + 1) + "/" + LEVELS.RoundzLevels.length;
  129.          }
  130.          if(_vx23._bu14)
  131.          {
  132.             _loc4_ = _gs337.iLanguage.strBlockzLevel + ": " + _gs337.iLanguage.strFinished;
  133.          }
  134.          else
  135.          {
  136.             _loc4_ = _gs337.iLanguage.strBlockzLevel + ": " + int(_cg33._ss555[1].prBlockzLevel + 1) + "/" + LEVELS.BlockzLevels.length;
  137.          }
  138.          _loc2_ = _gs337.iLanguage.strPlayerName + ":   " + String(param1[0]) + "\n";
  139.          _loc2_ += _loc3_ + "\n";
  140.          _loc2_ += _loc4_ + "\n";
  141.          this.iLabel.Text = _loc2_;
  142.       }
  143.       
  144.       override public function onEnterFrame(param1:Event) : void
  145.       {
  146.          super.onEnterFrame(param1);
  147.          switch(this.state)
  148.          {
  149.             case stNormal:
  150.                break;
  151.             case stEnterName:
  152.                if(this.iEnterName._hy116 == false)
  153.                {
  154.                   if(!this.iEnterName._gn229 && !_cg33._ss555)
  155.                   {
  156.                      this.iEnterName.show();
  157.                      return;
  158.                   }
  159.                   this.removeChild(this.iEnterName);
  160.                   if(this.iEnterName._gn229)
  161.                   {
  162.                      _cg33._jq283(this.iEnterName._gn229);
  163.                      this.iPlayers = _cg33._ts507;
  164.                      this.iInd = _cg33.iPlayerPos;
  165.                      this.Label = _cg33._ss555;
  166.                   }
  167.                   this.iEnterName._dx150();
  168.                   this.iEnterName = null;
  169.                   this.State = stNormal;
  170.                }
  171.          }
  172.       }
  173.       
  174.       public function set State(param1:int) : void
  175.       {
  176.          this.state = param1;
  177.          switch(this.state)
  178.          {
  179.             case stNormal:
  180.                break;
  181.             case stEnterName:
  182.                this.iEnterName = new _jt456();
  183.                this.addChild(this.iEnterName);
  184.          }
  185.       }
  186.    }
  187. }
  188.  
  189.